import java.util.Comparator;

public class StudentComparator implements Comparator<Student> {
    @Override
    public int compare(Student o1, Student o2) {
        if(o1.getStuAge()>o2.getStuAge()){
            return 1;
        }
        if(o1.getStuAge()==o2.getStuAge()){
            return o1.getStuName().compareTo(o2.getStuName());
        }
        return -1;
    }
}
